/**
 * 
 */
package edu.rice.test.simple;

import java.util.ArrayList;

/**
 * @author frogy
 *
 */
public class MultithreadRead {
	
	int[] a;
	int N;
	
	public MultithreadRead(int n){
		N = n;
		a = new int[N];
		for(int i = 0; i < N; i++){
			a[i] = i;
		}		
	}
	
	public ArrayList findNeighbor(int n){
		ArrayList t = new ArrayList();
		for(int i = 0; i < a.length; i++){
			if(Math.abs(n-a[i]) < 3){
				t.add(a[i]);
			}
		}
		return t;
	}
}
